
package playground.denis.thread_examples;



import java.io.File;

/**
 * That one passed the file to be tested a simple one ! 
 * starts the LineGetter and it starts the LinePorcesser
 * To use that class first change teh main_dir in the main and also 
 * change the file thing i can make it to take args from command line but 
 * there is no reason :) it is just a test !
 * @author makkalot
 * @licence GPLV2
 */
public class SetTester {
    
    public static void main (String [] argv ){
        try {

            //String main_dir = "/home/makkalot/Masaüstü/dontmmm/dontmove";
            if (argv.length!=1){
		for( String s : argv)
			System.out.println("The args  "+s);
		System.out.println("The arg length is "+argv.length);
		System.out.println("The usage is source <file_to_process>");
		System.exit(1);
	   }
	    	
            File f = new File(argv[0]);
            
            System.out.println("The file to be procesed is "+f.getAbsolutePath()+ " vee :"+f.getName());

            LineGetter lg = new LineGetter(f);
            Thread t = new Thread(lg);
            t.start();

            //wait for him to finish !
            t.join();
        } catch (InterruptedException ex) {
            
        }
        
    }
    

}
